class ToneEduError(Exception):
    pass

class PluginError(ToneEduError):
    pass

class NoSuchPluginError(PluginError):
    def __init__(self, *args):
        super(NoSuchPluginError, self).__init__(*args)
        self.message = "Error: No such plugin named %s" % args[0]

class NoActivePluginError(PluginError):
    def __init__(self, *args):
        super(NoActivePluginError, self).__init__(*args)
        self.message = "Error: No active plugin selected"

class SoundDeviceError(ToneEduError):
    pass

class NoSuchSoundDevice(SoundDeviceError):
    def __init__(self, *args):
        super(NoSuchSoundDevice, self).__init__(*args)
        self.message = "Error: No such sound device with device number %d" % args[0]

class NotInitedDevice(SoundDeviceError):
    def __init__(self, *args):
        super(NotInitedDevice, self).__init__(*args)
        self.message = "Error: The sound device is not initialized"

